<?php 
$val1 = $this->where ? $this->where : $this->defaultWhere;
$val2 = $this->what ? $this->what : $this->defaultWhat;

?>
<div id="search">
	<form id="searchForm" method="post" action="<?php echo $this->url(array('controller'=>'negocios','action'=>'buscar'), 'default')?>">
		<div class="where">
			<label for="where"><?php echo $this->translate('whereAreYou')?> <span><?php echo $this->translate('whereExample')?></span></label>
			<div>
				<input type="text" name="where" id="where" value="<?php echo $val1?>"/>
			</div>
		</div>
		<div class="what">
			<label for="what"><?php echo $this->translate('whatWouldYouLike')?> <span>(<?php echo $this->translate('optional')?>)</span></label>
			<div>
				<input type="text" name="what" id="what" value="<?php echo $val2?>"/>
			</div>
		</div>
		<div class="submit">
			<a class="button redButton" rel="nofollow, noindex"><span><?php echo $this->translate('search')?></span></a>
		</div>		
	</form>
	
	<?php 
	if (isset($this->cliente) && $direcciones = $this->cliente->getDirecciones()):?>
	<div id="direccionesCliente">
		<ul>
		<?php 
		foreach($direcciones as $direccion){
			
		echo "<li><a>".$direccion->toString(false)."</a></li>";					
			
		}
		?>
		</ul>
	</div>
	<?php 
	endif;
	?>
</div>
<?php 

$this->jQuery()->onLoadCaptureStart();

echo 'bindSearch("'.addslashes($this->defaultWhere).'", "'.addslashes($this->defaultWhat).'", "'.$this->countryCode.'");';

$this->jQuery()->onLoadCaptureEnd();
